<?php

require 'require.php';

if (isset($_GET['username']) && ($_GET['username'])) {

	if (!($check_user = mysql_query("SELECT username FROM openidoo_accounts WHERE username='".mysql_escape_string($_GET['username'])."' LIMIT 1", $realm_link_server))) {
				die('Query failed.');
			} else {

				if (mysql_num_rows($check_user) != 0) {
					?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
	<head>
		<title>Identity page for <?=htmlentities($_GET['user'], ENT_QUOTES ,'UTF-8')?></title>
		<link rel="openid.server" href="http://<?=OPENIDOO_DOMAIN?>/server.php" />
		<link rel="openid2.provider" href="http://<?=OPENIDOO_DOMAIN?>/server.php" />
	</head>
	<body>
		Identity page for <b><?=htmlentities($_GET['username'], ENT_QUOTES, 'UTF-8')?></b>
	</body>
</html>
					<?
				} else {
					?><b>Error :</b> User not found.<?
				}

			}


} else {
	header("Location: /index.php");
	exit;
}

?>
